#!/bin/bash


function collect {

for i in `ls output.* | cut -d. -f3 | sort | uniq`
	do
	#ls -c output.*.$i
	printf "test\t"
	for f in `ls -c output.*.$i`
		do
		predictor=`echo $f | cut -d. -f2`
		printf "%s\t" $predictor
		done
	echo ""
	break # bah, just assume the order is correct... WARNING!
done

#labels
 for i in `ls output.* | cut -d. -f3 | sort | uniq`
	do

	printf "%s\t" $i
	for f in `ls -c output.*.$i`
		do
		percentage=`grep -e "conditional:" $f | cut -d: -f2 | cut -f4`
		printf "%s\t" $percentage
		done
	echo ""
 done 
}


cd results

collect > results.conditional_collect.csv

